package com.ddxz.demo.liquibase.controller;

import com.ddxz.demo.liquibase.dto.TenantInfo;
import com.ddxz.demo.liquibase.service.TenantService;
import org.springframework.web.bind.annotation.*;

/**
 * class description
 *
 * @author 朱宗刚
 * @version 1.0.0
 * @date 2020/12/17
 */

@RestController
public class LiquibaseController {
    @RequestMapping(value = "/tenant/add", method = RequestMethod.POST)
    public Object addTenant(@RequestBody TenantInfo tenant) {
        return service.addTenant(tenant);
    }

    private final TenantService service;

    public LiquibaseController(TenantService service) {
        this.service = service;
    }
}
